﻿using Microsoft.Extensions.DependencyInjection;
using Nest;
using System;
using System.IO;

namespace ElasticSearchDemo.App
{
    class Program
    {
        static void Main(string[] args)
        {

            var services = new ServiceCollection();

            services.AddSingleton<IEsClientProvider, EsClientProvider>();

            var serviceProvider = services.BuildServiceProvider();

            StringReader sr = new StringReader("刘德华");
            IAnalyzer analyzer = new StandardAnalyzer();
            STConvertTokenFilter filter = new STConvertTokenFilter(analyzer.tokenStream("f", sr), STConvertType.SIMPLE_2_TRADITIONAL, ",", true);


            Console.WriteLine("Hello World!");
        }
    }
}
